
/**
 * 字符串转换化两位小数的浮点型，保留四舍五入
 * @param num
 * @returns {Number}
 */
function numberRand2(num){
	if(!num || num == null || num == undefined){
		return 0.00;
	}else{
		var num_value = parseFloat(num);
		return (Math.round(num_value * 100) / 100).toFixed(2);
	}
}


/**
 * 获取数值型整数部分
 * @param num
 * @returns
 */
function numberInteger(num){
	if(!num || num == null || num == undefined){
		return 0.00;
	}else{
		var num_value = parseFloat(num);
		var numStr = (Math.round(num_value * 100) / 100).toFixed(2);
		return numStr.substring(0,numStr.indexOf("."));
	}
}

/**
 * 获取数值型两位小数
 * @param num
 * @returns
 */
function numberDecimal(num){
	if(!num || num == null || num == undefined){
		return ".00";
	}else{
		var num_value = parseFloat(num);
		var numStr = (Math.round(num_value * 100) / 100).toFixed(2);
		return numStr.substring(numStr.indexOf("."));
	}
}


/**
 * 判断是否整数
 */
function isInteger(obj) {
	return typeof obj === 'number' && obj%1 === 0
}

